/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-11-28 20:18:34
 */
import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';
//  线索来源分析报表
export const queryClueSourceReport = params => axios.get(`${SERVER.CYXDMS_CLUE}/clueReport/queryClueSourceReport`, { params });

// 线索漏斗分析报表-订单/成交量
export const qryClueFunnelTables = params => axios.get(`${SERVER.CYXDMS_RETAIL}/ordermanage/salesReports/qryClueFunnelTables`, { params });

// 查询品牌下拉框
export const getBrandList = params => axios.get(`${SERVER.DMSCLOUD_SYSBASEDATA}/vehicleProduct/brandsqueryall`, { params });
// 查询车系下拉框
export const getSeriesList = (brandsid, params) => axios.get(`${SERVER.DMSCLOUD_SYSBASEDATA}/vehicleProduct/brandsdict/${brandsid}/seriessdict`, { brandsid: brandsid, params: params });
//  查询车型下拉框
export const getModelList = (brandsid, seriessid, params) => {
  const url = `${SERVER.DMSCLOUD_SYSBASEDATA}/vehicleProduct/brandsdict/${brandsid}/seriessdict/${seriessid}/modelsdict`;
  return axios.get(url, {
    seriessid: seriessid,
    brandsid: brandsid,
    params: params
  });
};

// 查询所属区域
export const getMerge = params => axios.get(`${SERVER.SYSMANAGE}/company/org/getMerge`, { params });
// 查询区域
export const getOrgByOrgType = params => axios.get(`${SERVER.SYSMANAGE}/org/getOrgByOrgType`, { params });
// 查询经销商列表
export const getSaleInfoMaintain = params => axios.get(`${SERVER.SYSMANAGE}/dealerSaleInfo/dealerByCityOrArea`, { params });
// 通过orgID获得所有人
export const getUserByOrgId = params => axios.get(`${SERVER.GMSCLOUD_MANAGE}/org/getUserByOrgId`, { params });
// 查询小组
export const getOrgTeam = params => axios.get(`${SERVER.GMSCLOUD_MANAGE}/org/sales/team`, { params });
